﻿// <copyright file="MapLabelPanel.xaml.cs" company="Taasss">Copyright (c) 2009 All Right Reserved</copyright>
// <author>Ben Vincent</author>
// <date>2010-02-21</date>
// <summary>MapLabelPanel</summary>
namespace Fotofly.PhotoViewer
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;

    public partial class MapLabelPanel : UserControl
    {
        public MapLabelPanel(string label, double latitude, double longitude, Color color)
        {
            this.InitializeComponent();

            this.marker.Fill = new SolidColorBrush(color);
            this.label.Text = "  " + label;
            this.latitude.Text = "  " + latitude.ToString();
            this.longitude.Text = "  " + longitude.ToString();

            this.details.Visibility = Visibility.Collapsed;
        }

        private void Rectangle_MouseEnter(object sender, MouseEventArgs e)
        {
            this.details.Visibility = Visibility.Visible;
        }

        private void Rectangle_MouseLeave(object sender, MouseEventArgs e)
        {
            this.details.Visibility = Visibility.Collapsed;
        }
    }
}
